<template>
	<div class="morestudent">
		<div class="top">
			<h2>{{titletext}}</h2>
			<h2 class="goback" @click="goback">返回</h2>
		</div>
		<div class="wrap">
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>姓&nbsp;&nbsp;&nbsp;名&nbsp;:</h3>
					<p>{{tableinfo.stuName}}</p>
				</el-col>
				<el-col class="col_1" :span="12">
					<h3>联系方式:</h3>
					<p>{{tableinfo.stuTel}}</p>
				</el-col>
			</el-row>
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>监护人:</h3>
					<p>{{tableinfo.stuGuardian}}</p>
				</el-col>
				<el-col class="col_1" :span="12">
					<h3>籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯&nbsp;&nbsp;:</h3>
					<p>{{tableinfo.stuHometown}}</p>
				</el-col>
			</el-row>
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>性&nbsp;&nbsp;&nbsp;别&nbsp;:</h3>
					<p>{{tableinfo.stuSex}}</p>
				</el-col>
				<el-col class="col_1" :span="12">
					<h3>民&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;族&nbsp;&nbsp;:</h3>
					<p>{{tableinfo.stuNation}}</p>
				</el-col>
			</el-row>
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>班&nbsp;&nbsp;&nbsp;级&nbsp;:</h3>
					<p>{{tableinfo.className}}</p>
				</el-col>
				<el-col class="col_1" :span="12">
					<h3>入学时间:</h3>
					<p>{{tableinfo.stuEnrollment}}</p>
					
				</el-col>
			</el-row>
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>年&nbsp;&nbsp;&nbsp;龄&nbsp;:</h3>
					<p>{{tableinfo.stuAge}}</p>
				
				</el-col>
				<el-col class="col_1" :span="12">
					<h3>兴趣爱好:</h3>
					<p>{{tableinfo.stuHobby}}</p>
				
				</el-col>
			</el-row>
			<el-row class="row_1">
				<el-col class="col_1" :span="12">
					<h3>学&nbsp;&nbsp;&nbsp;号&nbsp;:</h3>
					<p>{{tableinfo.stuNumber}}</p>
				</el-col>
			</el-row>
		</div>
	</div>
	
</template>

<script>
	export default{
		data() {
			return{
				baseUrl:require("../js/baseUrl.js").baseUrl,
				titletext:"学生信息",
				name:"",
				tableinfo:[],
				flag:false
			}	
		},
		methods:{
			goback(){
				this.$router.push("/studentmanager/student")
			},
			getmoreinfo(){
				//获取当前学生更多信息
				//  SchoolSys/stu/selectid
				this.$http.post(this.baseUrl+"student/stuInfo",{
					stuId:this.$route.query.stuId+""
				}).then(res=>{
					// console.log(this.tableinfo)
					if(res.data.code==200){
						this.tableinfo=res.data.data[0]
						console.log(this.tableinfo)
						// if(this.tableinfo){
						//  // this.tableinfo[0].clazzName=""
						//  this.tableinfo=res.data.data[0]
						//  console.log(this.tableinfo)
						//  console.log("有班级")
						// }else{
						// 	this.tableinfo=res.data.data
						// 	console.log(this.tableinfo)
						// 	console.log("没有班级")
						// 	this.tableinfo.clazzName="暂无"
						// }
					}
				})
			}
		},
		mounted() {
			//获取当前学生更多信息
			this.getmoreinfo()
		},
		
	}
</script>

<style>
	.morestudent{
		padding: 40px;
	}
	.morestudent .top{
		display: flex;
		justify-content: space-between;

	}
	
	.morestudent .goback{
		cursor: pointer;
		margin-right: 30px;
	}
	 .morestudent .wrap{

		margin-top: 30px;
	}
	.morestudent .wrap h3{
		width: 90px;
		height: 30px;
		line-height: 10px;
	}
	.morestudent .wrap p{
		width: 320px;
		margin-left: 10px;
		margin-bottom: 19px;
		line-height: 40px;
		border: 1px solid #999;
		background-color: #ffffff;
		padding-left: 10px;
	}
	.morestudent .wrap .row_1 .col_1{
		display: flex;
		align-items: center;
	}
</style>